<%-- 
    Document   : head_addresource
    Created on : Jan 7, 2012, 7:38:25 AM
    Author     : Ngoc Linh
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>

<title>Thêm tài nguyên cho sản phẩm - Trang cá nhân P2TBid</title>
<script src="../javascripts/FancyZoom.js" type="text/javascript"></script>
<script src="../javascripts/FancyZoomHTML.js" type="text/javascript"></script>
<script>window.onload = function() { setupZoom(); }</script>

<script type='text/javascript'>
    $(function() {
        $('p.message').delay(5000).fadeOut('slow');
    });
    function addFile(){
        
        var num = document.getElementById("numFile").value;
        
        if(num == '5'){
            return;
        }
        
        var newIn = document.createElement( 'input' );
        newIn.type='file';
        newIn.name='file_' + (parseInt(num) + 1).toString();
        newIn.id ='myupload';
        newIn.onchange = addFile;
        document.getElementById('fileul').appendChild(newIn);
        
        document.getElementById("numFile").value = parseInt(num) + 1;
    }   
    
    function checkImage(){
        if($('#myupload').val().length == 0){
            alert("Chọn ảnh trước khi tải lên !")
            return false;
        }
        
        return true;
    }
</script>
